package com.jackrain.nea.fc.ps.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.jdbc.SQL;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 商品档案-接口
 * Mapper
 *
 * @author zhang.zz
 * @create 2018/09/28
 */
@Mapper
public interface ShopQueryMapper {
    /**
     * 查询Sku
     * @param
     * @paramsizeid
     * @return Hashmap
     */
    @Select("SELECT PS_C_SKU.ECODE AS SKU_OUTER_ID,PS_C_SPECOBJ.ENAME AS VALUE FROM PS_C_SKU ,PS_C_SPECOBJ WHERE PS_C_SKU.PS_C_SPEC2OBJ_ID = PS_C_SPECOBJ.ID AND PS_C_SKU.PS_C_PRO_ID =#{id}")
    List<HashMap> selectShopSku(@Param("id") Long id);
    /**
     * 查询Pro
     * @param
     * @paramsizeid
     * @return Hashmap
     */
    @Select("SELECT SEX,ID,IMAGE,ECODE AS OUTER_ID ,PRICELIST AS PRICE,FABDESC AS SUBTITLE,ENAME AS TITLE,TXTDIM2  FROM PS_C_PRO WHERE CP_C_DISTRIB_ID = 0 AND ID =#{ids}")
    HashMap selectShopPro(@Param("ids") Long ids);


}
